package com.swf.jpa.generator;

import java.io.IOException;
import java.io.Serializable;
import java.util.Map;

import com.swf.jpa.framework.constant.MockConstants;
import com.swf.jpa.util.JPAUtil;

@SuppressWarnings("serial")
public class TableModel implements Serializable{

	public Map<String, Object> toMap() {
		return JPAUtil.toMap(this);
	}
	public String toJson() {
		return JPAUtil.toJson(this);
	}
	public String toHTMLPropertiesStr() {
		return JPAUtil.toHTMLPropertiesStr(this,MockConstants.LINE_SEPARATOR);
	}
	@Override
	public String toString() {
		return JPAUtil.toString(this);
	}
	@Override
	public int hashCode() {
		return toString().hashCode();
	}
	
	@Override
	public boolean equals(Object obj) {
		return this.hashCode()==obj.hashCode();
	}
}
